FROM amazoncorretto:17.0.12-alpine3.20

COPY data/pack/ data/forge-installer.jar /runtime/

WORKDIR /runtime

RUN java -jar forge-installer.jar --installServer && \
    rm forge-installer.jar forge-installer.jar.log && \
    echo eula=true > eula.txt && \
    echo -e "\n-Xms4G -Xmx4G" >> user_jvm_args.txt

CMD ./run.sh

EXPOSE 25565
